<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../../Templates/SubFolderTemplate.xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    
    <ui:define name="head_title">
        <title>View Profile | Merlion's ERP System</title>
    </ui:define>
    
    <ui:define name="content">
        <f:view beforePhase="#{viewProfileManagerBean.initView}">
                <h:form prependId="false">  

                    <p:panel id="panel" header="View Profile"> 
                        <p:ajaxStatus style="width:16px;height:16px;">   
                            <f:facet name="start">   
                                <p:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif" /> 
                            </f:facet> 

                            <f:facet name="complete">   
                                <h:outputText value="" />   
                            </f:facet>   
                        </p:ajaxStatus> 

                        <p:messages /> 

                        <h:panelGrid columns="3" cellpadding="10"> 

                            <h:outputLabel for="employeeUserName" style="font-weight: bold" value="Username: " /> 
                            <h:outputLabel value="#{viewProfileManagerBean.employee.userName}" id="employeeUserName"/>                    
                            <br/>
                            <h:outputLabel for="employeeName" style="font-weight: bold" value="Name: " /> 
                            <h:outputLabel value="#{viewProfileManagerBean.employee.employeeName}" id="employeeName"/>

                            <br/>
                            <h:outputLabel for="employeeNRIC" style="font-weight: bold" value="NRIC: " /> 
                            <h:outputLabel value="#{viewProfileManagerBean.employee.employeeNRIC}" id="employeeNRIC"/>

                            <br/>
                            <h:outputLabel for="employeeAddress" style="font-weight: bold" value="Address: " /> 
                            <h:outputLabel value="#{viewProfileManagerBean.employee.employeeAddress}" id="employeeAddress"/>

                            <br/>
                            <h:outputLabel for="employeeEmail" style="font-weight: bold" value="Email: " /> 
                            <h:outputLabel value="#{viewProfileManagerBean.employee.employeeEmail}" id="employeeEmail"/>

                            <br/>                    
                            <h:outputLabel for="employeeContactNo" style="font-weight: bold" value="Contact Number: " /> 
                            <h:outputLabel value="#{viewProfileManagerBean.employee.employeeContactNumber}" id="employeeContactNo"/>

                            <br/>                      
                        </h:panelGrid>                
                        <p:commandButton id="btn" value="Edit" update="panel" actionListener="#{viewProfileManagerBean.editProfile}" ajax="true" />
                    </p:panel> 

                </h:form>            
        </f:view>
    </ui:define>

</ui:composition>
